#include <gtest/gtest.h>
extern "C" {
#include "kml_fft_test.h"
#include "kml_blas_test.h"
#include "kml_lapack_test.h"
#include "kml_solver_test.h"
#include "kml_scalapack_test.h"
#include "kml_ipl_test.h"
#include "kml_conv_test.h"
#include "kml_vml_test.h"
#include "kml_vsl_test.h"
#include "kml_svml_test.h"
#include "kml_math_test.h"
#include "kml_spblas_test.h"
}

TEST(kml_test, kml_fft) {
    int result = kml_fft_c2c_01();
    EXPECT_EQ(result, 1) << "kml_fft_c2c_01 should succeed";
}

TEST(kml_test, kml_blas) {
    int result = kml_blas_sgemm_01();
    EXPECT_EQ(result, 1) << "kml_blas_sgemm_01 should succeed";
}

TEST(kml_test, kml_lapack) {
    int result = kml_lapack_dgetrf_01();
    EXPECT_EQ(result, 0) << "kml_lapack_dgetrf_01 should succeed";
}

TEST(kml_test, kml_solver) {
    int result = kml_solver_tydss_01();
    EXPECT_EQ(result, 0) << "kml_solver_tydss_01 should succeed";
}

TEST(kml_test, kml_scalapack) {
    int result = kml_scalapack_pdgetrf_01();
    EXPECT_EQ(result, 0) << "kml_scalapack_pdgetrf_01 should succeed";
}

TEST(kml_test, kml_ipl) {
    int result = kml_ipl_interp2d_01();
    EXPECT_EQ(result, 1) << "kml_ipl_interp2d_01 should succeed";
}

TEST(kml_test, kml_conv) {
    int result = kml_conv_conv2d_01();
    EXPECT_EQ(result, 1) << "kml_conv_conv2d_01 should succeed";
}

TEST(kml_test, kml_vml) {
    int result = kml_vml_sin_01();
    EXPECT_EQ(result, 1) << "kml_vml_sin_01 should succeed";
}

TEST(kml_test, kml_vsl) {
    int result = kml_vsl_uniform_01();
    EXPECT_EQ(result, 1) << "kml_vsl_uniform_01 should succeed";
}

TEST(kml_test, kml_svml) {
    int result = kml_svml_sin_01();
    EXPECT_EQ(result, 1) << "kml_svml_sin_01 should succeed";
}

TEST(kml_test, kml_math) {
    int result = kml_math_sin_01();
    EXPECT_EQ(result, 1) << "kml_math_sin_01 should succeed";
}

TEST(kml_test, kml_spblas) {
    int result = kml_spblas_spgemm_01();
    EXPECT_EQ(result, 1) << "kml_spblas_spgemm_01 should succeed";
}